using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Marlimer.Common;

namespace Marlimer.Data.Comercial
{
    public class com_MotivoAnulacion
    {
        public DataTable getDTMotivoAnulacion(int flg_devolucion)
        {
            SqlCommand sqlcmd = new SqlCommand();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();
 
            sqlcmd.CommandText = "spsdtMotivoAnulacion";
            sqlcmd.CommandType = CommandType.StoredProcedure;
            sqlcmd.Connection = Session.getConexion();

            sqlcmd.Parameters.Add("@flg_devolucion", SqlDbType.Int);

            sqlcmd.Parameters["@flg_devolucion"].Value = flg_devolucion;

            da.SelectCommand = sqlcmd;  
            da.Fill(ds);

            return ds.Tables[0]; 
        }
    }
}
